ContextCapture 用户指南

发布到 Cesium 或 ContextCapture Web Viewer 2.0

ContextCapture 可以 Cesium 3D Tiles 格式生成包含细节层次的三维模型,用于在 Cesium Web 应用程序中进行流式传输和显示。另外,ContextCapture 还可以生成可直接发布到 Web 的 Cesium 基本应用程序或 ContextCapture Web Viewer 2.0 应用程序。Cesium 完全基于客户端,因此 Cesium 3D Tiles 数据和 Cesium 应用程序可以托管在静态 Web 服务器上。

联机文件存储 Web 服务/内容交付网络(如 Azure Blob/CDN 或 Amazon S3/CloudFront)也受支持。

您可以通过下列步骤将三维模型发布到 Cesium 或 ContextCapture Web Viewer 2.0 应用程序:

  1. 选中“生成 Cesium 基本应用程序”(或 ContextCapture Web Viewer 2.0 应用程序)选项后,以 Cesium 3D Tiles 格式生成模型。对于 Cesium 应用程序,从 https://www.bingmapsportal.com 获取 Bing Maps API 密钥,以便能够使用 Bing Maps 作为 Cesium 球体的影像来源,并在生产项目的 app_cesium/main.js 文件顶部,输入 Bing Maps API 密钥。对于 ContextCapture Web Viewer 2.0 应用程序,此步骤不是必需的。

  2. 将整个 Production 文件夹(包括 Scene 和 App 子文件夹)上载到 Web 服务器。
  3. 访问 Cesium 应用程序,地址为 http://your_server/your_production/App/index.html

另外,在执行步骤 3 和 4 之前,您还可以自定义基本应用程序。

  • 对于 Cesium 应用程序,在 Javascript 的几行中,您可以添加字幕/徽标,并将 ContextCapture 生成的三维模型与其他三维模型、光栅或矢量 GIS 数据混合。要快速入门,请参考 Cesium 教程。
  • 另外,对于 ContextCapture Web Viewer 2.0 应用程序,在执行步骤 3 之前,您可以编辑配置文件 resources/config.json 以更改基本应用程序设置:
    • 单位:测量单位制(公制或英制)。
    • 标题:网页标题。

Orlando 将 Cesium 3D Tiles 格式的三维模型发布到 Cesium Web 应用程序的示例。需要大约一百行 JavaScript 代码才能将矢量和 POI 数据添加到 ContextCapture 生成的 Cesium 基本应用程序。